﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DBLayer;
using ModelLayer;

namespace TestUI
{
    class Program
    {
             
        static void Main(string[] args)
        {
            DBCity dbCity = new DBCity();
            City city = new City();
            IList<City> cities = new IList<City>();

            Console.WriteLine("Pre AddCityToDB(): " + city.CityName + " - " + city.PostalCode);

            dbCity.AddCityToDB(9000, "Aalborg");
            dbCity.AddCityToDB(9610, "Nørager");
            dbCity.AddCityToDB(9620, "Aalestrup");
            city = dbCity.RetrieveCity(9000);

            Console.WriteLine("Post AddCityToDB():");
            Console.WriteLine("--------------------");
            Console.WriteLine("City Name: " + city.CityName);
            Console.WriteLine("Postal Code: " + city.PostalCode);
            Console.WriteLine("--------------------");
            cities = dbCity.RetrieveAllTheCities();


            Console.WriteLine("--------------------");
            foreach (City c in cities)
            {
                Console.WriteLine(c.CityName + " - " + c.PostalCode);
                Console.WriteLine("--------------------");
            }

            Console.ReadKey();
            dbCity.DeleteCities();

            

        }


    }
}
